﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace DelegetAndEventTest.PbulishAndSubscribe
{
    /// <summary>
    /// 发布者
    /// </summary>
    class Publisher : IPublish
    {

        private Dispatch dispatch { get; set; }
        public Publisher(Dispatch dispatch)
        {
            this.dispatch = dispatch;
        }
        public void NotifyMessage()
        {
            dispatch.ReciveMessage("今天又大雨，注意天气防止雷电！");            
        }
    }
}
